package com.example.blog.entity;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.apache.ibatis.type.SimpleTypeRegistry;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: lu
 * @Date: 2023-09-05-8:42
 * @Description: 个人中心
 */
@Data
public class User {

    private  Integer id;

    private  String userName;

    private  String passWord;

    private  String email;

    private Date lastLoginTime;

    private  String phone;

    private  String nickname;

    @JsonSerialize(using = LocalDateTimeSerializer.class)//序列化器
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)//反序列化器
    private LocalDateTime createTime;

    @JsonSerialize(using = LocalDateTimeSerializer.class)//序列化器
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)//反序列化器
    private  LocalDateTime updateTime;

}
